<?php

/*
 * Make connection to the database
 */
class Database {
    private static $_connection;


    public static function connect()
    {
        $host = "localhost";
        $username = "root";
        $password = "";
        $database = "arjansite";
        $mysqli =  new mysqli($host,$username,$password,$database);
        self::$_connection = $mysqli;
    }
    
    public static function disconnect()
    {
        self::$_connection->close();
    }
    
    public static function getConnection()
    {
        return self::$_connection;
    }
    
    public static function select($query)
    {
          return mysqli_query(self::$_connection,$query);         
    }

}
Database::connect();
?>
